import time
from public.action import *
from public.business import *
from public.testData import *
from public.tools import *
testCase="DBshop006_商品管理删除属性流程"
firefox=openBrowser(urlAdmin) #调用函数打开网址
DBshopLoginAdmin(firefox)
DBshopEnterMenu3(firefox,'商品管理','商品属性','属性')
firefox.find_element_by_link_text('删除').click()
firefox.switch_to.alert.accept()
time.sleep(3)
try:
    firefox.find_element_by_xpath("//td[contains(.,'天天向上')]").is_displayed()    #is_displayed()函数判断元素是否显示
    writeLog("%s 测试失败"%testCase)
except:
    writeLog("%s 测试通过" % testCase)
    getPhoto(firefox)
firefox.quit()
